package com.authentications.security.password;

import com.authentications.security.info.UserPasswordInfo;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * @ClassName DefaultUserPassword
 * @Author xiezhuocai
 * @Description TODO
 * @Date 2021/12/20 1:32
 */
public class DefaultUserPassword implements UserPassword {
    @Override
    public UserPasswordInfo pwd(String username) {
        //UserPasswordInfo info =userDao.select(username);
        UserPasswordInfo info = new UserPasswordInfo();
        info.setUserInfo("admin");
        info.setPwd("$2a$10$apDrn0/WnSzcBEVP0FFFcObA.prWx8GnzUZQXHvD.T/TUOEg3dSqm");
        List<String> authList = new ArrayList<>();
        authList.add("test");
        authList.add("test1");
        authList.add("test2");
        info.setAuthorities(authList);
        info.setRoles(Collections.singletonList("admin"));
        return info;
    }

}
